<!DOCTYPE html>
<html lang="en">
	<head>
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<meta charset="utf-8" />
		<title>Blank Page - Ace Admin</title>

		<meta name="description" content="" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />

		<!-- bootstrap & fontawesome -->
		<link rel="stylesheet" href="#(CPATH)/assets/css/bootstrap.css" />
		<link rel="stylesheet" href="#(CPATH)/assets/css/font-awesome.css" />

		<!-- page specific plugin styles -->
		<link rel="stylesheet" href="#(CPATH)/assets/css/bootstrap-table.css">
		<link rel="stylesheet" href="#(CPATH)/assets/css/basejace.css">
		<link rel="stylesheet" href="#(CPATH)/assets/js/jstree/themes/default/style.css"><!-- 使用jstree插件 -->
		
		<!-- text fonts -->
		<link rel="stylesheet" href="#(CPATH)/assets/css/ace-fonts.css" />

		<!-- ace styles -->
		<link rel="stylesheet" href="#(CPATH)/assets/css/ace.css" class="ace-main-stylesheet" id="main-ace-style" />

		<!--[if lte IE 9]>
			<link rel="stylesheet" href="#(CPATH)/assets/css/ace-part2.css" class="ace-main-stylesheet" />
		<![endif]-->

		<!--[if lte IE 9]>
		  <link rel="stylesheet" href="#(CPATH)/assets/css/ace-ie.css" />
		<![endif]-->

		<!-- inline styles related to this page -->

		<!-- ace settings handler -->
		<script src="#(CPATH)/assets/js/ace-extra.js"></script>

		<!-- HTML5shiv and Respond.js for IE8 to support HTML5 elements and media queries -->

		<!--[if lte IE 8]>
		<script src="#(CPATH)/assets/js/html5shiv.js"></script>
		<script src="#(CPATH)/assets/js/respond.js"></script>
		<![endif]-->
	</head>

	<body class="no-skin">
		<div class="main-container" id="main-container">
			<script type="text/javascript">
				try{ace.settings.check('main-container' , 'fixed')}catch(e){}
			</script>
			<div class="main-content">
				<div class="page-content">
					<div class="row">
						<div class="col-xs-12">
							<div id="controlTree" style="padding-left:2px;">
							</div>
						</div>
					</div>
				</div> <!-- ./page-content -->
			</div> <!-- ./main-content -->
		</div>
		<!-- basic scripts -->
		<!--[if !IE]> -->
		<script type="text/javascript">
			window.jQuery || document.write("<script src='#(CPATH)/assets/js/jquery.js'>"+"<"+"/script>");
		</script>

		<!-- <![endif]-->

		<!--[if IE]>
<script type="text/javascript">
 window.jQuery || document.write("<script src='#(CPATH)/assets/js/jquery1x.js'>"+"<"+"/script>");
</script>
<![endif]-->
		<script type="text/javascript">
			if('ontouchstart' in document.documentElement) document.write("<script src='#(CPATH)/assets/js/jquery.mobile.custom.js'>"+"<"+"/script>");
		</script>
		<script src="#(CPATH)/assets/js/bootstrap.js"></script>

		<!-- page specific plugin scripts -->
		<script src="#(CPATH)/assets/js/bootstrap-table/bootstrap-table.js"></script>
		<script src="#(CPATH)/assets/js/bootstrap-table/locale/bootstrap-table-zh-CN.js"></script>
		<script src="#(CPATH)/assets/js/bootbox.js"></script>
		<script src="#(CPATH)/assets/js/jstree/jstree.js"></script>
		
		<!-- ace scripts -->
		<script src="#(CPATH)/assets/js/ace/elements.scroller.js"></script>
		<script src="#(CPATH)/assets/js/ace/elements.colorpicker.js"></script>
		<script src="#(CPATH)/assets/js/ace/elements.fileinput.js"></script>
		<script src="#(CPATH)/assets/js/ace/elements.typeahead.js"></script>
		<script src="#(CPATH)/assets/js/ace/elements.wysiwyg.js"></script>
		<script src="#(CPATH)/assets/js/ace/elements.spinner.js"></script>
		<script src="#(CPATH)/assets/js/ace/elements.treeview.js"></script>
		<script src="#(CPATH)/assets/js/ace/elements.wizard.js"></script>
		<script src="#(CPATH)/assets/js/ace/elements.aside.js"></script>
		<script src="#(CPATH)/assets/js/ace/ace.js"></script>
		<script src="#(CPATH)/assets/js/ace/ace.ajax-content.js"></script>
		<script src="#(CPATH)/assets/js/ace/ace.touch-drag.js"></script>
		<script src="#(CPATH)/assets/js/ace/ace.sidebar.js"></script>
		<script src="#(CPATH)/assets/js/ace/ace.sidebar-scroll-1.js"></script>
		<script src="#(CPATH)/assets/js/ace/ace.submenu-hover.js"></script>
		<script src="#(CPATH)/assets/js/ace/ace.widget-box.js"></script>
		<script src="#(CPATH)/assets/js/ace/ace.settings.js"></script>
		<script src="#(CPATH)/assets/js/ace/ace.settings-rtl.js"></script>
		<script src="#(CPATH)/assets/js/ace/ace.settings-skin.js"></script>
		<script src="#(CPATH)/assets/js/ace/ace.widget-on-reload.js"></script>
		<script src="#(CPATH)/assets/js/ace/ace.searchbox-autocomplete.js"></script>

		<!-- inline scripts related to this page -->
		<script type="text/javascript">
			var cmdView = "#(CPATH)/system/control/view";
			var cmdDelete = "#(CPATH)/system/user/delete";
			$(function(){
				
				$("#controlTree")
					.on("changed.jstree", function (e, data) {
						if(data.selected.length) {
							//alert('The selected node is: ' + data.instance.get_node(data.selected[0]).text);
							console.log("select the node: " + data.instance.get_node(data.selected[0]).id );
							$("#contentFrame").attr("src", cmdView + "?PK=" + data.instance.get_node(data.selected[0]).id);
						}
					})
					.jstree({
						'plugins':["wholerow","checkbox"],
						'core' : {
							'multiple' : false,
							'data'     : {
								'url'  : "#(CPATH)/system/control/tree",
								'dataType' : "json"
							}
						}
					});
				var initSelect = function() {
					
					alert("hh");
				}();
			});
			
			
			
			
			function add() {
				location.href = "#(CPATH)/system/user/add";
			}
			
			function modify() {
				location.href = "#(CPATH)/system/user/add";
			}
			
		</script>
	</body>
</html>
